import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LoginComponent } from './login/login.component';
import { forgetPsdComponent } from './forgetPsd/forgetPsd.component';
import {IndexComponent} from './index.component';
import {Index2Component} from './index/index.component';
import {MakeComponent} from "./make/make.component";
// import {NewsComponent} from "./news/news.component";
import {PartnerComponent} from "./partner/partner.component";
import {AboutComponent} from "./about/about.component";
import {RegisterComponent} from "./register/register.component";
import {NewsListComponent} from "./news-list/news-list.component";
import {NewsDetailComponent} from "./news-detail/news-detail.component";
import { MinappIndexComponent } from './minapp-index/minapp-index.component';

const routes: Routes = [
  // {
  //   path: '',
  //   component: IndexComponent,
  //   children: [
  //     {path: 'index', component: Index2Component},
  //     {path: 'make', component: MakeComponent},
  //     {path: 'partner', component: PartnerComponent},
  //     {path: 'news', component: NewsComponent},
  //     {path: 'news-detail', component: NewsDetailComponent},
  //     {path: 'about', component: AboutComponent},
  //     {path: 'register', component: RegisterComponent},
  //     {path: '', component: Index2Component}
  //   ]
  // },
  {path: 'login', component: LoginComponent},
  {path: 'forgetPsd', component: forgetPsdComponent},
  {path: 'index', component: Index2Component},
  {path: 'make', component: MakeComponent},
  {path: 'partner', component: PartnerComponent},
  // {path: 'news/:id', component: NewsComponent},
  {path: 'news-list', component: NewsListComponent},
  {path: 'news-detail/:id', component: NewsDetailComponent},
  {path: 'about', component: AboutComponent},
  {path: 'register', component: RegisterComponent},
  {path: 'minapp-index', component: MinappIndexComponent}
];

@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule
  ],
  providers: []
})
export class IndexRoutingModule {
}
